﻿<%@ Page Language="vb" ContentType="text/xml" AutoEventWireup="false" CodeBehind="RSSfeed.aspx.vb" Inherits="prototype.RSSfeed" %>
<%@ Import Namespace="System.Data" %>

    <asp:SqlDataSource ID="ClubDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PlayersConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:PlayersConnectionString.ProviderName %>" 
        
        
    SelectCommand="SELECT [ID], [FirstName], [LastName], [DateOfBirth], [PlayingPosition], [ClubGoals], [Nationality], [PlayerDetails], [AddedDate], [AddedBy], [PlayerPicture3], [PlayerPicture2], [CurrentClub], [PlayerPicture] FROM [Players]">
    </asp:SqlDataSource>

<asp:Repeater id="rptRSS" runat="server" DataSourceID="ClubDataSource">
  <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title>Real Madrid The Best Club in History </title>
        <description>Be a part of Madridista Family </description>
  </HeaderTemplate>
  <ItemTemplate>
        <item>
          <title><%# FormatForXML(DataBinder.Eval(Container.DataItem, "LastName"))%></title>
          <description><%# FormatForXML(DataBinder.Eval(Container.DataItem, "PlayingPosition"))%></description>
          <link> Details.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "ID"))%></link>
          <author><%# FormatForXML(DataBinder.Eval(Container.DataItem, "AddedBy"))%></author>
          <pubDate><%# FormatForXML(DataBinder.Eval(Container.DataItem, "AddedDate"))%></pubDate>
        </item>
  </ItemTemplate>
  <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
</asp:Repeater>